import request from '@/utils/request'

// 查询风险判定主列表
export function listEvaluation(query) {
  return request({
    url: '/syf/evaluation/list',
    method: 'get',
    params: query
  })
}

// 查询风险判定主详细
export function getEvaluation(id) {
  return request({
    url: '/syf/evaluation/' + id,
    method: 'get'
  })
}

// 根据单元ID查询风险判定主详细
export function getEvaluationByUnitId(unitId) {
  return request({
    url: '/syf/evaluation/unit/' + unitId,
    method: 'get'
  })
}

// 新增风险判定主
export function addEvaluation(data) {
  return request({
    url: '/syf/evaluation',
    method: 'post',
    data: data
  })
}

// 修改风险判定主
export function updateEvaluation(data) {
  return request({
    url: '/syf/evaluation',
    method: 'put',
    data: data
  })
}

// 删除风险判定主
export function delEvaluation(id) {
  return request({
    url: '/syf/evaluation/' + id,
    method: 'delete'
  })
}
